﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:controls="clr-namespace:Rhiannon.Windows.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Font.xaml"/>
        <ResourceDictionary Source="Color.xaml"/>
        <ResourceDictionary>
			
            <Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
				<Setter Property="Foreground" Value="{StaticResource PrimaryButtonNormalForegroundBrush}" />
				<Setter Property="Background" Value="{StaticResource PrimaryButtonNormalBackgroundBrush}" />
				<Setter Property="BorderBrush" Value="{StaticResource PrimaryButtonNormalBorderBrush}" />
				<Setter Property="VerticalAlignment" Value="Stretch" />
                <Setter Property="SnapsToDevicePixels" Value="True" />
				<Setter Property="HorizontalAlignment" Value="Stretch" />
				<Setter Property="BorderThickness" Value="1" />
				<Setter Property="MinWidth" Value="80" />
                <Setter Property="Height" Value="22" />
                <Setter Property="Margin" Value="2" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
							<Border Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
									VerticalAlignment="{TemplateBinding VerticalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}">
                                <ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,0,4,0" RecognizesAccessKey="True"/>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter TargetName="Border" Property="Background" Value="{StaticResource PrimaryButtonHoverBackgroundBrush}" />
                                    <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PrimaryButtonHoverBorderBrush}" />
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter Property="Foreground" Value="{StaticResource PrimaryButtonDisabledForegroundBrush}" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            
			<Style x:Key="PrimaryButtonBig" TargetType="{x:Type Button}">
				<Setter Property="Foreground" Value="#FFF" />
				<Setter Property="TextBlock.FontSize" Value="15" />
				<Setter Property="SnapsToDevicePixels" Value="True" />
				<Setter Property="Padding" Value="0" />
				<Setter Property="Margin" Value="7" />
				<Setter Property="Cursor" Value="Hand" />
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<Border Name="Border" Background="{StaticResource SecondaryColorBrush}" BorderBrush="#999" BorderThickness="1"
									Padding="{TemplateBinding Padding}" Height="{TemplateBinding Height}">
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="50" />
										<ColumnDefinition Width="*" />
									</Grid.ColumnDefinitions>
									<Grid>
										<Border Background="#fff" Opacity="0.3"  Height="25" Width="25" CornerRadius="12" />
										<Border Background="#fff" Height="15" Width="3" HorizontalAlignment="Center" VerticalAlignment="Center" />
										<Border Background="#fff" Height="3" Width="15" HorizontalAlignment="Center" VerticalAlignment="Center" />
									</Grid>
									<ContentPresenter Grid.Column="1" />
								</Grid>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter TargetName="Border" Property="Background" Value="#84ADFF" />
								</Trigger>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Foreground" Value="{StaticResource PrimaryButtonDisabledForegroundBrush}" />
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			
			
			<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
                <Setter Property="Height" Value="14" />
                <Setter Property="Width" Value="14" />
                <Setter Property="Foreground" Value="{StaticResource PrimaryButtonNormalForegroundBrush}" />
                <Setter Property="Margin" Value="3" />
                <Setter Property="Padding" Value="3" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid>
                                <Border Name="Border" BorderBrush="Transparent" BorderThickness="1" Opacity="0.7">
                                    <Border BorderBrush="Transparent" BorderThickness="1" Opacity="0.01" Background="Transparent" />
                                </Border>
                                <Grid Width="10" Height="10">
                                    <Path Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeThickness="2" Data="F1 M 0,0L 10,10" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <Path Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeThickness="2" Data="F1 M 10,0L 0,10" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                </Grid>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter TargetName="Border" Property="BorderBrush" Value="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}} }" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="BlurlessImageButton" TargetType="{x:Type Button}">
                <Setter Property="Foreground" Value="#000000" />
                <Setter Property="SnapsToDevicePixels" Value="True" />
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Height" Value="35" />
                <Setter Property="Width" Value="35" />
                <Setter Property="Cursor" Value="Hand" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Border Name="Border">
                                <ContentPresenter />
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="true">
                                    <Setter TargetName="Border" Property="Background" Value="#CDE6F7" />
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="false">
                                    <Setter TargetName="Border" Property="Opacity" Value="0.5" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>